package com.joysuch.wwyt.api.sync;

import java.util.Date;

public class SyncJobUtil {


    public static  boolean checkIfDifferent(Object s1, Object s2){
        if(s1 == null && s2 == null){
            return false;
        }
        if(s1 == null || s2== null){
            return true;
        }
        if(s1 instanceof Date){
            return ((Date) s1).compareTo((Date)s2) != 0;
        }
        if(s1 instanceof String){
            return !((String) s1).trim().equals(s2.toString().trim());
        }

        return !s1.equals(s2);
    }


}
